package sz.szsmk.citizencard.ui.activity;

import androidx.viewpager.widget.ViewPager;

import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.chenenyu.router.annotation.Route;

import sz.szsmk.citizencard.R;
import sz.szsmk.citizencard.ui.base.IBaseActivity;
import sz.szsmk.citizencard.widget.MyViewPager;

@Route("BusChangeActivity")
public class BusChangeActivity extends IBaseActivity   {
    MyViewPager viewpager;
    LinearLayout lin_ad;
    private String lines = "";

    @Override
    protected int attachLayoutRes() {
        return R.layout.activity_buschange;
    }

    @Override
    protected void initInjector() {

    }


    @Override
    protected void initViews() {
        viewpager = findViewById(R.id.main_myviewpager);
        lin_ad = findViewById(R.id.main_image_pre_bar);

        ImageView back = (ImageView) findViewById(R.id.back);
        TextView title = (TextView) findViewById(R.id.setting_title);
        title.setText("路径规划");
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        double startlat = getIntent().getDoubleExtra("startlat", 0.0);
        double startlng = getIntent().getDoubleExtra("startlng", 0.0);
        double endlat = getIntent().getDoubleExtra("endlat", 0.0);
        double endlng = getIntent().getDoubleExtra("endlng", 0.0);


        String end = getIntent().getStringExtra("end");
        String start = getIntent().getStringExtra("start");

        initViewPager();
    }

    @Override
    protected void updateViews() {

    }


    private double taxiPrice = 0.0;




    ImageView[] imageViews;

    @SuppressWarnings("deprecation")
    private void initViewPager() {
        viewpager.setAdapter(null);
        viewpager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {


            @Override
            public void onPageSelected(int arg0) {

            }

            @Override
            public void onPageScrolled(int arg0, float arg1, int arg2) {
                // TODO Auto-generated method stub

            }

            @Override
            public void onPageScrollStateChanged(int arg0) {
                // TODO Auto-generated method stub

            }
        });

        lin_ad = (LinearLayout) findViewById(R.id.main_image_pre_bar);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
                40, 40);
        layoutParams.setMargins(4, 3, 4, 14);
    }
}
